package android;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;

public class MyServer {
	private static InputStream is;
	private static OutputStream os;
	private static ObjectInputStream ois;
	static ObjectOutputStream oos;
	/**
	 * @param args
	 * @throws ClassNotFoundException 
	 */
	public static void main(String[] args) throws ClassNotFoundException {
			
			System.out.println("MyServer Start !!!!! ");
			ArrayList<Socket> list = new ArrayList<Socket>();
			
			try {
				ServerSocket serversocket = new ServerSocket(7000);
				System.out.println("Myserver created, waiting client ~~~ ");
				
				while(true){
					Socket socket = serversocket.accept();
					list.add(socket);
					System.out.println("client connected "+socket.getInetAddress().getHostAddress());
					
				}
				
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

	}

}
